home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / examples / doc / surf01 < prev    next >
Text File  |  1997-07-08  |  2KB  |  55 lines

  1. ; This batch file creates three surface plots used as examples in
  2. ; Chapter 11, "Plotting Multi-dimensional Arrays", of _Using IDL_.
  3.  
  4. ; Restore variables elev, X, and Y.
  5.  
  6. @cntour01
  7.  
  8. ; Resize the original data into a 72 x 92 array, setting all data values 
  9. ; which are less than 2650 (the lowest elevation we wish to show) to 2650. 
  10.  
  11. surf = REBIN(elev > 2650, 360/5, 460/5)
  12.  
  13. ; Create a window for the first image.
  14.  
  15. WINDOW, 1, XSIZE=500, YSIZE=350
  16.  
  17. ; Display the surface, drawing a "skirt" down to 2650 meters.
  18.  
  19. SURFACE, surf, X, Y, SKIRT = 2650, AX=45
  20.  
  21. ; Use the READ procedure to prompt the user to press a key. The
  22. ; value stored in the variable 'var' is not used. 
  23.  
  24. var=''
  25. READ, var, $
  26.     PROMPT='Press Return to display the SURFACE plot from the reverse angle'
  27.  
  28. ; Display the surface from the "back side" of the data. Note that the
  29. ; axes are rotated as well.
  30.  
  31. WINDOW, 2, XS=500, YS=350
  32. SURFACE, surf, X, Y, SKIRT = 2650, /HORIZONTAL, AZ = 210, AX = 45
  33.  
  34. READ, var, $
  35.     PROMPT='Press Return to display the SURFACE plot with data rotated'
  36.  
  37. WINDOW, 3, XS=500, YS=350
  38.  
  39. ; Display the "back side" of the data by reversing the range of the axis
  40. ; values rather than by rotating the view of the data. This is accomplished
  41. ; by reversing the minimum and maximum values of the X and Y ranges, via
  42. ; the XRANGE and YRANGE keywords.
  43.  
  44. SURFACE, surf, X, Y, SKIRT = 2650, /HORIZONTAL, AX = 45,$
  45.     YRANGE = [MAX(Y), MIN(Y)], XRANGE=[MAX(X), MIN(X)]
  46.  
  47. READ, var, $
  48.     PROMPT='Press Return delete all three windows'
  49.  
  50. ; Delete the windows.
  51.  
  52. WDELETE, 1, 2, 3
  53.  
  54.  
  55.